package com.test.converttest;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.test.converttest.model.Customer;
import lombok.Getter;
import lombok.Setter;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2018/9/11 13:42
 */
public class ConversionAction extends ActionSupport implements ModelDriven<Customer> {
    private static final long serialVersionUID = -1326504221071762647L;

    @Setter
    @Getter
    private Customer customer;

    @Override
    public String execute() {
        System.out.println(customer.toString());
        return "success";
    }

    @Override
    public Customer getModel() {
        customer = new Customer();
        return customer;
    }

}
